package io.renren.modules.miniapp.controller;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.R;
import io.renren.modules.communityService.dto.DbSuggestionsDTO;
import io.renren.modules.communityService.dto.MiniAppDbSuggestionsListDTO;
import io.renren.modules.communityService.dto.MiniAppDbSuggestionsSaveDTO;
import io.renren.modules.communityService.service.DbSuggestionsService;
import io.renren.modules.communityService.vo.DbSuggestionsVO;
import io.renren.modules.miniapp.dto.MiniAppDbOneClickAlarmListDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;


/**
 * 投诉建议
 *
 * @author chenweilong
 * @email 1433471850@qq.com
 * @date 2021-03-21 14:40:08
 */
@RestController
@RequestMapping("miniapp/dbsuggestions")
@Api(value = "小程序投诉建议",tags = "小程序投诉建议")
public class MiniAppDbSuggestionsController {
    @Autowired
    private DbSuggestionsService dbSuggestionsService;


    /**
     * 投诉建议列表
     */
    @GetMapping("/list")
    @ApiOperation(value = "投诉建议列表",notes = "投诉建议列表")
    public R list(MiniAppDbSuggestionsListDTO dto){
        PageUtils page = dbSuggestionsService.queryPage(dto);
        return R.data(page);
    }


    /**
     * 保存
     */
    @PostMapping("/save")
    @ApiOperation(value = "保存投诉建议",notes = "保存投诉建议")
    public R save(@RequestBody MiniAppDbSuggestionsSaveDTO dbSuggestions){
		dbSuggestionsService.save(dbSuggestions);
        return R.ok();
    }


}
